package cn.livingCloud.dto;

import cn.livingCloud.entity.user.UserAccount;

/**
 * Created by 唐旭 on 2016/1/14.
 */
public class ChangePasswordDto {
    private String oldPassword;
    private String newPassword;
    private String confirmPassword;

    public ChangePasswordDto() {
    }

    public String getOldPassword() {
        return oldPassword;
    }

    public ChangePasswordDto setOldPassword(String oldPassword) {
        this.oldPassword = oldPassword;
        return this;
    }

    public String getNewPassword() {
        return newPassword;
    }

    public ChangePasswordDto setNewPassword(String newPassword) {
        this.newPassword = newPassword;
        return this;
    }

    public String getConfirmPassword() {
        return confirmPassword;
    }

    public ChangePasswordDto setConfirmPassword(String confirmPassword) {
        this.confirmPassword = confirmPassword;
        return this;
    }

    public void update(UserAccount newAccount) {
        newAccount.setPassword(this.confirmPassword);
    }
}

